package hyl.core.info;

/**
 * 文件块
 * <p>
 * 
 * @className: Filepart
 *             </p>
 *             <p>
 *             Description:
 *             </p>
 * 
 * @author: zoudyaou qq:37798955
 * @date: 2018年11月13日 下午2:53:04
 * @copyright: 2018 zoudayou Inc. All rights reserved.
 *             注意：代码版权归邹达有所有，任何人未经授权不得私自用于商业目的
 */
public class FileBlock {
	long seed = 0L;
	long size = 0;
	int blockindex = 0;
	String md5 = "";

	public FileBlock(int blockindex, long size, long seed) {
		this.seed = seed;
		this.size = size;
		this.blockindex = blockindex;
	}

	public void setMd5(String md5) {
		this.md5 = md5;
	}

	public boolean checkMd5(String md5) {
		if (this.md5.equals(md5)) {
			return true;
		}
		return false;
	}

	public boolean checksize(long size) {
		if (this.size == size)
			return true;
		return false;
	}
}
